package com.cloudpivot.receivales.workorder.domain;

import com.cloudpivot.receivales.workorder.view.RspReportEnum;
import lombok.Data;

import java.util.Map;

/**
 * 报告服务请求 统一返回对象
 */
@Data
public class RspReportDTO<T> {
    private Integer code;
    private String msg;
    private T data;

    public RspReportDTO(Integer code,  T data) {
        this.code=code;
        this.msg= RspReportEnum.getValue(code);
        this.data=data;
    }

    public RspReportDTO(Integer code, String msg) {
        this.code=code;
        this.msg=msg;
        this.data=null;
    }

    public RspReportDTO(Integer code) {
        this.code= code;
        this.msg=RspReportEnum.getValue(code);
        this.data=null;
    }
}
